<template>
   <div class="goodsDesc-container">
       <h2>{{info.title}}</h2>
       
       <hr>
       <div class="content" v-html="info.content">

       </div>
   </div>
</template>

<script>
import {Toast}  from 'mint-ui'

export default {
   data(){
       return{
         info:{}
       }
   },
   created(){
    this.getInfo();
   },
   methods:{
       getInfo(){
           this.$http.get("api/goods/getdesc/"+this.$route.params.id).then(
               result =>{
                   if(result.body.status == 0){
                      this.info = result.body.message[0]
                   }
                   else{
                       Toast("加载图文数据失败...")
                   }
               }
           )
       }
   }
}
</script>

<style lang="scss">
.goodsDesc-container h2{
  font-size:16px;
  color:blue;
  text-align: center;
  margin:15px 0;
}

.goodsDesc-container .content img{
    width: 100%;
}

</style>